import React, { Component } from 'react'
import Routeview from "../../router/routerView"
import { routerItem } from "../../router/routerConfig"
import { NavLink } from "react-router-dom"
interface Iprops {
    routes: routerItem[]
}
export class Home extends Component<Iprops, {}> {
    render() {
        return (
            <div className="home-page wrap">
                <main>
                    <Routeview routes={this.props.routes}></Routeview>
                </main>
                <footer>
                    {
                        this.props.routes.map((item: routerItem) => {
                            return item.tit ? <NavLink key={item.path} to={item.path}>{item.tit}</NavLink> : null
                        })
                    }
                </footer>
            </div>
        )
    }
}

export default Home
